package com.googlecode.ozonbooksfinder.cairngormfinder.business
{
	import com.adobe.cairngorm.business.ServiceLocator;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.IResponder;
	import mx.rpc.soap.WebService;
	
	public class BookDetailsDelegate
	{
		private var responder : IResponder;
		private var service : WebService;
		
		public function BookDetailsDelegate(responder:IResponder)
		{
			this.service = ServiceLocator.getInstance().getWebService("wsOzoneBookDetailsService");
			this.responder = responder;
		}
		
		public function getItemDetails(id:int) : void
		{	
			var call:AsyncToken = service.ItemDetail.send(id);
			call.addResponder(responder);
		}
		
		public function getItemInfo(id:int) : void
		{	
			var call:AsyncToken = service.ItemInfo.send(id);
			call.addResponder(responder);
		}
	}
}